package com.bdth.bdthiss.vo;

import java.util.List;

/**
 * Created by Administrator on 2018/11/9.
 */
public class CommonList<T> {
    private String code;
    private String message;
    private List<T> result;

    /**
     * 成功输出数据，消息messag为空
     * @param result
     * @param <T>
     * @return
     */
    public static<T> CommonList<T> success(List<T> result){
        return new CommonList<T>("200","",result);
    }

    public CommonList(String code, String message, List<T> result) {
        this.code = code;
        this.message = message;
        this.result = result;
    }

    public CommonList() {
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<T> getResult() {
        return result;
    }

    public void setResult(List<T> result) {
        this.result = result;
    }
}
